package com.zzzy.sys.vo.role;

import com.zzzy.framework.common.annotation.RangeValuesCheck;
import com.zzzy.framework.common.enums.sys.DataScopeEnum;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import javax.validation.constraints.NotNull;
import java.util.List;

@Schema(description = "赋予角色数据权限")
@Data
public class RoleDataScopeReq {

    @Schema(description = "角色ID")
    @NotNull(message = "角色ID不能为空")
    private Long id;

    @Schema(description = "数据范围")
    @NotNull(message = "数据范围不能为空")
    @RangeValuesCheck(enumValueRange = DataScopeEnum.class, message = "数据范围选择错误")
    private Integer dataScope;

    @Schema(description = "部门ID列表，只有范围类型为 DEPT_CUSTOM 时，该字段才需要", example = "1,3,5")
    private List<Long> dataScopeDeptIds;

}
